package com.lam.mall.entity;

import com.lam.common.validate.group.Add;
import javax.validation.constraints.Size;

import java.math.BigDecimal;
import java.util.Date;
import com.lam.common.validate.annotation.DictCheck;
import com.lam.common.utils.DateUtil;
import com.lam.common.validate.annotation.DictValid;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lam.common.components.dict.annotation.Dict;
import com.baomidou.mybatisplus.annotation.TableField;
import javax.validation.constraints.Null;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lam.common.base.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.FieldFill;

/**
 * 订单支付记录对象 mall_pay_info
 * 
 * @author admin
 * @date 2023-05-07
 */
@DictCheck
@TableName("mall_pay_info")
public class PayInfo implements BaseEntity{

    /** 主键 */
    @Null(groups = Add.class, message="payId必须为空")
    @TableId(type = IdType.ASSIGN_ID)
    private String payId;
    
    /** 用户id */
    private String userId;

    /** 本次支付关联的多个订单号 */
    @Size(max = 255, message = "本次支付关联的多个订单号长度不能超过255个字符")
    private String orderIds;

    /** 外部订单流水号 */
    @Size(max = 36, message = "外部订单流水号长度不能超过36个字符")
    private String bizPayNo;

    /** 支付方式 (0-手动代付 1-微信支付 2-支付宝) */
    @DictValid(message = "无效的支付方式 ")
    @Dict(dictCode = "pay_type")
    private Integer payType;

    /** 支付状态(0-未支付, 1-已支付) */
    @DictValid(message = "无效的支付状态")
    @Dict(dictCode = "pay_status")
    private Integer payStatus;

    /** 支付金额 */
    private BigDecimal payAmount;

    /** 版本号 */
    private Integer version;

    /** 回调内容 */
    @Size(max = 4000, message = "回调内容长度不能超过4000个字符")
    private String callbackContent;

    /** 回调时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    private Date callbackTime;

    /** 确认时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    private Date confirmTime;

    /** 创建时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /** 更新时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;

    public void setPayId(String payId) {
        this.payId = payId;
    }

    public String getPayId() {
        return payId;
    } 

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserId() {
        return userId;
    }    
    
    public void setOrderIds(String orderIds) {
        this.orderIds = orderIds;
    }

    public String getOrderIds() {
        return orderIds;
    }    
    
    public void setBizPayNo(String bizPayNo) {
        this.bizPayNo = bizPayNo;
    }

    public String getBizPayNo() {
        return bizPayNo;
    }    
    
    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public Integer getPayType() {
        return payType;
    }    
    
    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    public Integer getPayStatus() {
        return payStatus;
    }    
    
    public void setPayAmount(BigDecimal payAmount) {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount() {
        return payAmount;
    }    
    
    public void setVersion(Integer version) {
        this.version = version;
    }

    public Integer getVersion() {
        return version;
    }    
    
    public void setCallbackContent(String callbackContent) {
        this.callbackContent = callbackContent;
    }

    public String getCallbackContent() {
        return callbackContent;
    }    
    
    public void setCallbackTime(Date callbackTime) {
        this.callbackTime = callbackTime;
    }

    public Date getCallbackTime() {
        return callbackTime;
    }    
    
    public void setConfirmTime(Date confirmTime) {
        this.confirmTime = confirmTime;
    }

    public Date getConfirmTime() {
        return confirmTime;
    }    
    
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }    
    
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }    
    

}
